<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Channel Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__dma__channel__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Channel Functions<div class="ingroups"><a class="el" href="group__group__dma.html">DMA          (Direct Memory Access)</a> &raquo; <a class="el" href="group__group__dma__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab0beed3c05362206ac66fc4327d8964b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__dma__enums.html#gafbef983fffc7c7bb724322e8f64d32e5">cy_en_dma_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel, <a class="el" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> const *channelConfig)</td></tr>
<tr class="memdesc:gab0beed3c05362206ac66fc4327d8964b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the DMA channel with a descriptor and other parameters.  <a href="#gab0beed3c05362206ac66fc4327d8964b">More...</a><br /></td></tr>
<tr class="separator:gab0beed3c05362206ac66fc4327d8964b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2821469d78001afc568b0e484f684c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:gae2821469d78001afc568b0e484f684c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the content of registers corresponding to the channel.  <a href="#gae2821469d78001afc568b0e484f684c1">More...</a><br /></td></tr>
<tr class="separator:gae2821469d78001afc568b0e484f684c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c5cca40de761c4b7827ce65538bf12d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel, <a class="el" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> const *descriptor)</td></tr>
<tr class="memdesc:ga4c5cca40de761c4b7827ce65538bf12d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a descriptor as current for the specified DMA channel.  <a href="#ga4c5cca40de761c4b7827ce65538bf12d">More...</a><br /></td></tr>
<tr class="separator:ga4c5cca40de761c4b7827ce65538bf12d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13e6923cafe660ba825ba6d5b1841bf7"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga13e6923cafe660ba825ba6d5b1841bf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function is used to enable a DMA channel.  <a href="#ga13e6923cafe660ba825ba6d5b1841bf7">More...</a><br /></td></tr>
<tr class="separator:ga13e6923cafe660ba825ba6d5b1841bf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a51ce188be53678509a623517d96f16"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga5a51ce188be53678509a623517d96f16"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function checks whether a channel is in the enabled state.  <a href="#ga5a51ce188be53678509a623517d96f16">More...</a><br /></td></tr>
<tr class="separator:ga5a51ce188be53678509a623517d96f16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84ff3039034f39eb11962f19b1b2bae1"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga84ff3039034f39eb11962f19b1b2bae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function is used to disable a DMA channel.  <a href="#ga84ff3039034f39eb11962f19b1b2bae1">More...</a><br /></td></tr>
<tr class="separator:ga84ff3039034f39eb11962f19b1b2bae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae088032ef5679610fdcbea8d1b4a3cd3"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel, uint32_t priority)</td></tr>
<tr class="memdesc:gae088032ef5679610fdcbea8d1b4a3cd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function is used to set a priority for the DMA channel.  <a href="#gae088032ef5679610fdcbea8d1b4a3cd3">More...</a><br /></td></tr>
<tr class="separator:gae088032ef5679610fdcbea8d1b4a3cd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29e33eb65906b09e28669d62d2e1b546"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga29e33eb65906b09e28669d62d2e1b546"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the priority of the DMA channel.  <a href="#ga29e33eb65906b09e28669d62d2e1b546">More...</a><br /></td></tr>
<tr class="separator:ga29e33eb65906b09e28669d62d2e1b546"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ef61cb63dafd8b822dea5f2e6995614"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga6ef61cb63dafd8b822dea5f2e6995614">Cy_DMA_Channel_GetStatus</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga6ef61cb63dafd8b822dea5f2e6995614"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the interrupt reason of the specified channel.  <a href="#ga6ef61cb63dafd8b822dea5f2e6995614">More...</a><br /></td></tr>
<tr class="separator:ga6ef61cb63dafd8b822dea5f2e6995614"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga020fff71acefa4c88fd6d3dacfba4e75"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga020fff71acefa4c88fd6d3dacfba4e75">Cy_DMA_Channel_GetCurrentDescriptor</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga020fff71acefa4c88fd6d3dacfba4e75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the descriptor that is active in the channel.  <a href="#ga020fff71acefa4c88fd6d3dacfba4e75">More...</a><br /></td></tr>
<tr class="separator:ga020fff71acefa4c88fd6d3dacfba4e75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaceff87bfa4f24dfde2764ea8c45a1ecd"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:gaceff87bfa4f24dfde2764ea8c45a1ecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current Y loop index for the channel.  <a href="#gaceff87bfa4f24dfde2764ea8c45a1ecd">More...</a><br /></td></tr>
<tr class="separator:gaceff87bfa4f24dfde2764ea8c45a1ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7fc35a1163e4d27c69a6bb79cd0d0798"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga7fc35a1163e4d27c69a6bb79cd0d0798">Cy_DMA_Channel_GetInterruptStatus</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga7fc35a1163e4d27c69a6bb79cd0d0798"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the interrupt status of the specified channel.  <a href="#ga7fc35a1163e4d27c69a6bb79cd0d0798">More...</a><br /></td></tr>
<tr class="separator:ga7fc35a1163e4d27c69a6bb79cd0d0798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c5df2a8d891163cc1cc996e7d76c967"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga9c5df2a8d891163cc1cc996e7d76c967">Cy_DMA_Channel_ClearInterrupt</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga9c5df2a8d891163cc1cc996e7d76c967"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the interrupt status of the specified channel.  <a href="#ga9c5df2a8d891163cc1cc996e7d76c967">More...</a><br /></td></tr>
<tr class="separator:ga9c5df2a8d891163cc1cc996e7d76c967"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e4c217a23c7c6e8f49de1f28dfe3dbe"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">Cy_DMA_Channel_SetInterrupt</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga1e4c217a23c7c6e8f49de1f28dfe3dbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the interrupt for the specified channel.  <a href="#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">More...</a><br /></td></tr>
<tr class="separator:ga1e4c217a23c7c6e8f49de1f28dfe3dbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga411730b6a2653cc096ff0c6d1373efa3"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga411730b6a2653cc096ff0c6d1373efa3">Cy_DMA_Channel_GetInterruptMask</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga411730b6a2653cc096ff0c6d1373efa3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the interrupt mask value of the specified channel.  <a href="#ga411730b6a2653cc096ff0c6d1373efa3">More...</a><br /></td></tr>
<tr class="separator:ga411730b6a2653cc096ff0c6d1373efa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3e0528d8e57ee04dbbee89ffca38545"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, uint32_t channel, uint32_t interrupt)</td></tr>
<tr class="memdesc:gab3e0528d8e57ee04dbbee89ffca38545"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an interrupt mask value for the specified channel.  <a href="#gab3e0528d8e57ee04dbbee89ffca38545">More...</a><br /></td></tr>
<tr class="separator:gab3e0528d8e57ee04dbbee89ffca38545"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3c2d11f8314b30f83dc8987b5e18f63c"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga3c2d11f8314b30f83dc8987b5e18f63c">Cy_DMA_Channel_GetInterruptStatusMasked</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga3c2d11f8314b30f83dc8987b5e18f63c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the logical AND of the corresponding INTR and INTR_MASK fields in a single-load operation.  <a href="#ga3c2d11f8314b30f83dc8987b5e18f63c">More...</a><br /></td></tr>
<tr class="separator:ga3c2d11f8314b30f83dc8987b5e18f63c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0fdf26389ba1b635c7627e7924f0a501"><td class="memItemLeft" align="right" valign="top">__STATIC_FORCEINLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__channel__functions.html#ga0fdf26389ba1b635c7627e7924f0a501">Cy_DMA_Channel_SetSWTrigger</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base, uint32_t channel)</td></tr>
<tr class="memdesc:ga0fdf26389ba1b635c7627e7924f0a501"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function is used to set a SW trigger for a channel.  <a href="#ga0fdf26389ba1b635c7627e7924f0a501">More...</a><br /></td></tr>
<tr class="separator:ga0fdf26389ba1b635c7627e7924f0a501"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gab0beed3c05362206ac66fc4327d8964b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab0beed3c05362206ac66fc4327d8964b">&#9670;&nbsp;</a></span>Cy_DMA_Channel_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__dma__enums.html#gafbef983fffc7c7bb724322e8f64d32e5">cy_en_dma_status_t</a> Cy_DMA_Channel_Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> const *&#160;</td>
          <td class="paramname"><em>channelConfig</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the DMA channel with a descriptor and other parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>A channel number.</td></tr>
    <tr><td class="paramname">channelConfig</td><td>The structure that has the initialization information for the channel.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status /ref cy_en_dma_status_t.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gae2821469d78001afc568b0e484f684c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2821469d78001afc568b0e484f684c1">&#9670;&nbsp;</a></span>Cy_DMA_Channel_DeInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_DMA_Channel_DeInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the content of registers corresponding to the channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>A channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Disable the DMA channel 0 of block DW0 if it&#39;s priority equals 3 */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (3UL == <a class="code" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a>(DW0, 0UL))</div><div class="line">    {    </div><div class="line">        <span class="keywordflow">if</span> (0UL != <a class="code" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a>(DW0))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a>(DW0, 0UL);</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a>(DW0, 0UL);</div><div class="line"></div><div class="line">            <span class="comment">/* if needed (if there is only channel used) the whole block can be disabled */</span></div><div class="line">            <a class="code" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a>(DW0);</div><div class="line">        }</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga4c5cca40de761c4b7827ce65538bf12d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c5cca40de761c4b7827ce65538bf12d">&#9670;&nbsp;</a></span>Cy_DMA_Channel_SetDescriptor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_SetDescriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> const *&#160;</td>
          <td class="paramname"><em>descriptor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a descriptor as current for the specified DMA channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
    <tr><td class="paramname">descriptor</td><td>This is the descriptor to be associated with the channel. For CAT1C devices this pointer needs to point to 32 byte aligned structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga13e6923cafe660ba825ba6d5b1841bf7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga13e6923cafe660ba825ba6d5b1841bf7">&#9670;&nbsp;</a></span>Cy_DMA_Channel_Enable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_Enable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function is used to enable a DMA channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga5a51ce188be53678509a623517d96f16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5a51ce188be53678509a623517d96f16">&#9670;&nbsp;</a></span>Cy_DMA_Channel_IsEnabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE bool Cy_DMA_Channel_IsEnabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function checks whether a channel is in the enabled state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga84ff3039034f39eb11962f19b1b2bae1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga84ff3039034f39eb11962f19b1b2bae1">&#9670;&nbsp;</a></span>Cy_DMA_Channel_Disable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_Disable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function is used to disable a DMA channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Disable the DMA channel 0 of block DW0 if it&#39;s priority equals 3 */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (3UL == <a class="code" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a>(DW0, 0UL))</div><div class="line">    {    </div><div class="line">        <span class="keywordflow">if</span> (0UL != <a class="code" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a>(DW0))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a>(DW0, 0UL);</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a>(DW0, 0UL);</div><div class="line"></div><div class="line">            <span class="comment">/* if needed (if there is only channel used) the whole block can be disabled */</span></div><div class="line">            <a class="code" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a>(DW0);</div><div class="line">        }</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gae088032ef5679610fdcbea8d1b4a3cd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae088032ef5679610fdcbea8d1b4a3cd3">&#9670;&nbsp;</a></span>Cy_DMA_Channel_SetPriority()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_SetPriority </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function is used to set a priority for the DMA channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
    <tr><td class="paramname">priority</td><td>The priority to be set for the DMA channel. The allowed values are 0,1,2,3.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga29e33eb65906b09e28669d62d2e1b546"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29e33eb65906b09e28669d62d2e1b546">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetPriority()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_Channel_GetPriority </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the priority of the DMA channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The priority of the channel.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Disable the DMA channel 0 of block DW0 if it&#39;s priority equals 3 */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (3UL == <a class="code" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a>(DW0, 0UL))</div><div class="line">    {    </div><div class="line">        <span class="keywordflow">if</span> (0UL != <a class="code" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a>(DW0))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a>(DW0, 0UL);</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a>(DW0, 0UL);</div><div class="line"></div><div class="line">            <span class="comment">/* if needed (if there is only channel used) the whole block can be disabled */</span></div><div class="line">            <a class="code" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a>(DW0);</div><div class="line">        }</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga6ef61cb63dafd8b822dea5f2e6995614"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6ef61cb63dafd8b822dea5f2e6995614">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a> Cy_DMA_Channel_GetStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the interrupt reason of the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The cause <a class="el" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a> of the interrupt.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Inside the interrupt service routine for block DW0 channel 0: */</span>    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga3c2d11f8314b30f83dc8987b5e18f63c">Cy_DMA_Channel_GetInterruptStatusMasked</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Get the interrupt cause */</span></div><div class="line">        <a class="code" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a> cause = <a class="code" href="group__group__dma__channel__functions.html#ga6ef61cb63dafd8b822dea5f2e6995614">Cy_DMA_Channel_GetStatus</a>(DW0, 0UL);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#gga7189163831c474aa76bcc6ede832b14ead85f85bcc56e4e5808433baf63cd2bab">CY_DMA_INTR_CAUSE_COMPLETION</a> != cause)</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="comment">/* Clear the interrupt */</span></div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#ga9c5df2a8d891163cc1cc996e7d76c967">Cy_DMA_Channel_ClearInterrupt</a>(DW0, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga020fff71acefa4c88fd6d3dacfba4e75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga020fff71acefa4c88fd6d3dacfba4e75">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetCurrentDescriptor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> * Cy_DMA_Channel_GetCurrentDescriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the descriptor that is active in the channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The pointer to the descriptor associated with the channel.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">     <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor = {0};</div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: Disable a descriptor */</span></div><div class="line">    <span class="keywordflow">if</span> (&amp;descriptor != <a class="code" href="group__group__dma__channel__functions.html#ga020fff71acefa4c88fd6d3dacfba4e75">Cy_DMA_Channel_GetCurrentDescriptor</a>(DW0, 0UL)) <span class="comment">/* Make sure it is not in use */</span></div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__dma__descriptor__functions.html#ga67ca76e4d5a5c17b2119ff07e89b0b93">Cy_DMA_Descriptor_DeInit</a>(&amp;descriptor);</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gaceff87bfa4f24dfde2764ea8c45a1ecd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaceff87bfa4f24dfde2764ea8c45a1ecd">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetCurrentYIndex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint8_t Cy_DMA_Channel_GetCurrentYIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the current Y loop index for the channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Y loop index value.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga7fc35a1163e4d27c69a6bb79cd0d0798"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7fc35a1163e4d27c69a6bb79cd0d0798">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetInterruptStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_Channel_GetInterruptStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the interrupt status of the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of an interrupt for the specified channel.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Need to check the  interrupt status regardless of whether it is enabled (masked) or not */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga7fc35a1163e4d27c69a6bb79cd0d0798">Cy_DMA_Channel_GetInterruptStatus</a> (DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* The DW0 channel 0 interrupt is pending */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga9c5df2a8d891163cc1cc996e7d76c967"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c5df2a8d891163cc1cc996e7d76c967">&#9670;&nbsp;</a></span>Cy_DMA_Channel_ClearInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_ClearInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the interrupt status of the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Inside the interrupt service routine for block DW0 channel 0: */</span>    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga3c2d11f8314b30f83dc8987b5e18f63c">Cy_DMA_Channel_GetInterruptStatusMasked</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Get the interrupt cause */</span></div><div class="line">        <a class="code" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a> cause = <a class="code" href="group__group__dma__channel__functions.html#ga6ef61cb63dafd8b822dea5f2e6995614">Cy_DMA_Channel_GetStatus</a>(DW0, 0UL);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#gga7189163831c474aa76bcc6ede832b14ead85f85bcc56e4e5808433baf63cd2bab">CY_DMA_INTR_CAUSE_COMPLETION</a> != cause)</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="comment">/* Clear the interrupt */</span></div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#ga9c5df2a8d891163cc1cc996e7d76c967">Cy_DMA_Channel_ClearInterrupt</a>(DW0, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga1e4c217a23c7c6e8f49de1f28dfe3dbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">&#9670;&nbsp;</a></span>Cy_DMA_Channel_SetInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_SetInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the interrupt for the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Enable interrupts for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Test the interrupt for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">Cy_DMA_Channel_SetInterrupt</a>(DW0, 0UL);</div><div class="line">    <span class="comment">/* Now the interrupt should occur (if it is enabled, of course) */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: Disable interrupts for block DW0 channel 0 if it is enabled */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga411730b6a2653cc096ff0c6d1373efa3">Cy_DMA_Channel_GetInterruptMask</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga411730b6a2653cc096ff0c6d1373efa3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga411730b6a2653cc096ff0c6d1373efa3">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_Channel_GetInterruptMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the interrupt mask value of the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interrupt mask value.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Enable interrupts for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Test the interrupt for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">Cy_DMA_Channel_SetInterrupt</a>(DW0, 0UL);</div><div class="line">    <span class="comment">/* Now the interrupt should occur (if it is enabled, of course) */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: Disable interrupts for block DW0 channel 0 if it is enabled */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga411730b6a2653cc096ff0c6d1373efa3">Cy_DMA_Channel_GetInterruptMask</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gab3e0528d8e57ee04dbbee89ffca38545"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3e0528d8e57ee04dbbee89ffca38545">&#9670;&nbsp;</a></span>Cy_DMA_Channel_SetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Channel_SetInterruptMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>interrupt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets an interrupt mask value for the specified channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
    <tr><td class="paramname">interrupt</td><td>The interrupt mask: CY_DMA_INTR_MASK to enable the interrupt or 0UL to disable the interrupt.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Enable interrupts for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Test the interrupt for block DW0 channel 0 */</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga1e4c217a23c7c6e8f49de1f28dfe3dbe">Cy_DMA_Channel_SetInterrupt</a>(DW0, 0UL);</div><div class="line">    <span class="comment">/* Now the interrupt should occur (if it is enabled, of course) */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: Disable interrupts for block DW0 channel 0 if it is enabled */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga411730b6a2653cc096ff0c6d1373efa3">Cy_DMA_Channel_GetInterruptMask</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a> (DW0, 0UL, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga3c2d11f8314b30f83dc8987b5e18f63c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3c2d11f8314b30f83dc8987b5e18f63c">&#9670;&nbsp;</a></span>Cy_DMA_Channel_GetInterruptStatusMasked()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_Channel_GetInterruptStatusMasked </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the logical AND of the corresponding INTR and INTR_MASK fields in a single-load operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Inside the interrupt service routine for block DW0 channel 0: */</span>    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a> == <a class="code" href="group__group__dma__channel__functions.html#ga3c2d11f8314b30f83dc8987b5e18f63c">Cy_DMA_Channel_GetInterruptStatusMasked</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Get the interrupt cause */</span></div><div class="line">        <a class="code" href="group__group__dma__enums.html#ga7189163831c474aa76bcc6ede832b14e">cy_en_dma_intr_cause_t</a> cause = <a class="code" href="group__group__dma__channel__functions.html#ga6ef61cb63dafd8b822dea5f2e6995614">Cy_DMA_Channel_GetStatus</a>(DW0, 0UL);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#gga7189163831c474aa76bcc6ede832b14ead85f85bcc56e4e5808433baf63cd2bab">CY_DMA_INTR_CAUSE_COMPLETION</a> != cause)</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="comment">/* Clear the interrupt */</span></div><div class="line">        <a class="code" href="group__group__dma__channel__functions.html#ga9c5df2a8d891163cc1cc996e7d76c967">Cy_DMA_Channel_ClearInterrupt</a>(DW0, 0UL);</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga0fdf26389ba1b635c7627e7924f0a501"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0fdf26389ba1b635c7627e7924f0a501">&#9670;&nbsp;</a></span>Cy_DMA_Channel_SetSWTrigger()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_FORCEINLINE void Cy_DMA_Channel_SetSWTrigger </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function is used to set a SW trigger for a channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">channel</td><td>The channel number. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
